/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ve.com.cantv.worktables.ejb.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Ghust
 */
@Embeddable
public class RoltaskPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "idrol")
    private int idrol;
    @Basic(optional = false)
    @Column(name = "idtask")
    private int idtask;

    public RoltaskPK() {
    }

    public RoltaskPK(int idrol, int idtask) {
        this.idrol = idrol;
        this.idtask = idtask;
    }

    public int getIdrol() {
        return idrol;
    }

    public void setIdrol(int idrol) {
        this.idrol = idrol;
    }

    public int getIdtask() {
        return idtask;
    }

    public void setIdtask(int idtask) {
        this.idtask = idtask;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idrol;
        hash += (int) idtask;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof RoltaskPK)) {
            return false;
        }
        RoltaskPK other = (RoltaskPK) object;
        if (this.idrol != other.idrol) {
            return false;
        }
        if (this.idtask != other.idtask) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "ve.com.cantv.worktables.ejb.entity.RoltaskPK[idrol=" + idrol + ", idtask=" + idtask + "]";
    }

}
